package com.thh.web.controller.common;

import com.thh.common.core.model.entity.SysUser;
import com.thh.datamonitor.entity.TmdDatabase;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 通用模态窗口
 * 
 * @author thh
 */
@Controller
@RequestMapping("/common/modal")
public class CommonDialogController
{
    private String prefix = "common/modal";

    /**
     * 用户表格回传父窗体
     */
    @GetMapping("/parent/sysUser")
    public String parent(SysUser sysUser, ModelMap mmap)
    {
        mmap.put("querySysUser", sysUser);
        return prefix + "/table/parent/SysUser";
    }

    /**
     * 数据库表格回传父窗体
     */
    @GetMapping("/parent/tmdDatabase")
    public String parent(TmdDatabase tmdDatabase, ModelMap mmap)
    {
        mmap.put("queryTmdDatabase", tmdDatabase);
        return prefix + "/table/parent/tmdDatabase";
    }

}
